﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BuildPlannerLib.Enums;

namespace BuildPlannerLib
{
    // Base class for all upgrades
    public class Upgrade
    {
        // String field for the name of the upgrade
        public string Name;

        // Integer fields for the cost and production time
        public int MineralCost;
        public int GasCost;
        public int TimeDuration;

        // String fields for the name of the production building and required building
        public string ProducedFrom;
        public string Requirement;

        // UpgradeStatus enum field for the status of the upgrade
        public UpgradeStatus Status;

        // Constructor with parameters for upgrade name, cost, time duration, and production building
        public Upgrade(string name, int mineralCost, int gasCost, int timeDuration, string producedFrom)
        {
            Name = name;

            MineralCost = mineralCost;
            GasCost = gasCost;
            TimeDuration = timeDuration;

            ProducedFrom = producedFrom;
        }

        // Constructor with parameters for upgrade name, cost, time duration, production building and required building
        public Upgrade(string name, int mineralCost, int gasCost, int timeDuration, string producedFrom, string requirement)
        {
            Name = name;

            MineralCost = mineralCost;
            GasCost = gasCost;
            TimeDuration = timeDuration;

            ProducedFrom = producedFrom;
        }

        public void Reset()
        {
            Status = UpgradeStatus.NotStarted;
        }
    }
}
